package anshe.net
{
	import anshe.widget.AnsheNetSpace;
	import anshe.widget.AnsheServer;
	
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;

	public class AnsheNet extends EventDispatcher
	{
		// public static const NCURL:String = "rtmp://192.168.2.91/r5acs";//NC地址
		public static const NCURL:String = "rtmp://59.173.248.198/r5acs";//NC地址
		// public static const NCURL:String = "rtmp://69.65.42.45/r5acs";//NC地址
				
		private static var m_myNC:RedConnection;		//	Red5 服务器连接程序
		private static var m_mySO:RedSharedObject;		//	Red5 SharedObject 连接对象
		
		public static var netSpace:AnsheNetSpace;
		public static var netServer:AnsheServer;
		
		//	18:23:30

		public static function get nc():RedConnection
		{
			if(!m_myNC)
			{
				m_myNC = new RedConnection();
			}
			return m_myNC;
		}
		
		public static function get so():RedSharedObject
		{
			if(!m_mySO)
			{
				m_mySO = new RedSharedObject();
			}
			return m_mySO;
		}

		public function AnsheNet(target:IEventDispatcher=null)
		{
			throw new Error("Can't create this class");
		}
		
	}
}